package cn.lll.vuehouse.common;

public enum ResponseStatus {

    DANGER_ERROR(500, "不要尝试删除当前登录用户"),
    SCORE_EXIST(500, "请先删除成绩表内相关数据"),
    COURSE_EXIST(500, "编号或名称已被占用"),
    STUNO_EXIST(500, "学号已被占用"),
    HAS_CHILDNODE(500, "含有子节点不能删除"),
    ROLE_EXIST(500, "角色名或权限字符已被占用"),
    USER_EXIST(500, "用户名已存在"),
    AUTHORIZATION_ERROR(500, "权限异常"),
    AUTHENTICATION_ERROR(500, "请认证后访问"),
    TOKEN_EXPIRED(500, "TOKEN失效"),
    TOKEN_ERROR(500, "TOKEN异常"),
    LOCK_ACCOUNT(500, "账户被禁用"),
    INCORRECT_CREDENTIALS(500, "密码错误"),
    UNKNOWN_ACCOUNT(500, "用户名不存在"),
    LOGIN_SUCCESS(200, "登录成功"),
    CODE_ERROR(500, "验证码错误"),
    CODE_EXPIRE(500, "验证码失效"),
    FAIL(500, "操作失败"),
    SUCCESS(200, "操作成功"),
    CUSTOMER_EXIST(500, "客户名已存在"),
    PROVIDER_EXIST(500, "供应商名称已存在"),
    GOODS_EXIST(500, "商品已存在"),
    ROLE_FAIL(500, "角色已存在"),

    ADD_SUCCESS(200, "添加成功"),
    UPDATE_SUCCESS(200, "编辑成功"),
    DELETE_SUCCESS(200, "删除成功"),
    DEPT_HAS_PERSON(500, "部门存在人"),
    DEPT_EXITS(500, "部门重复");


    private Integer code;
    private String msg;


    ResponseStatus(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
